Skip to content

Conversation

@shawnbot
Copy link
Contributor

@shawnbot shawnbot commented Nov 1, 2019

😭 No docs preview yet, sorry!

This builds on #971 and (after a bad first attempt a couple of weeks ago) adds a new Support / Variables page that looks like this:

image

And it incorporates the deprecation data to let people know that if/when they're going away!

image

TODO

  • Swap out the canary release of @primer/css in docs/package.json for... what, exactly? 🤔

@vercel
Copy link

vercel bot commented Nov 1, 2019

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/primer/primer-css/ihjujkf9z
🌍 Preview: https://primer-css-git-variables-page.primer.now.sh

@shawnbot
Copy link
Contributor Author

shawnbot commented Nov 4, 2019

I'm blocked on getting this to deploy because Gatsby doesn't seem to like importing (in JS) files outside of the project directory (in this case, ../../dist/variables.json). @colebemis took a look with me, and I thought I had it, but ended up stuck on this error:

25 \| `
11:35:09 AM | 26 \|
11:35:09 AM | > 27 \| for (const name of Object.keys(variables)) {
11:35:09 AM | \|                                ^
11:35:09 AM | 28 \|   if (name.endsWith('-font')) {
11:35:09 AM | 29 \|     delete variables[name]
11:35:09 AM | 30 \|   }
11:35:09 AM |  
11:35:09 AM | WebpackError: ReferenceError: variables is not defined
11:35:09 AM |  
11:35:09 AM | - variables.js:27 Module../src/variables.js
11:35:09 AM | src/variables.js:27:32
11:35:09 AM |  
11:35:09 AM | - mdx-scopes.js:3 Module../node_modules/gatsby-plugin-mdx/loaders/mdx-scopes.j    s
11:35:09 AM | node_modules/gatsby-plugin-mdx/loaders/mdx-scopes.js:3:15
11:35:09 AM |  
11:35:09 AM | - gatsby-ssr.js:1 Module../node_modules/gatsby-plugin-mdx/gatsby-ssr.js
11:35:09 AM | node_modules/gatsby-plugin-mdx/gatsby-ssr.js:1:1
11:35:09 AM |  
11:35:09 AM |  
11:35:09 AM | ⠦ Building static HTML for pages
11:35:09 AM |  

But I'm very clearly importing variables above that, so I have no idea what's going on here. Marking as blocked for now. ☹️

@shawnbot
Copy link
Contributor Author

If I don't get around to fixing this up by the end of the week, one thing to try might be copying the built files from /dist into docs/src/dist (or anywhere under docs/src, I guess). I don't know what's going on, but it seems like maybe an issue with Gatsby not wanting to load anything outside of its src directory? 🤔

@BinaryMuse BinaryMuse self-assigned this Dec 11, 2019
@vercel vercel bot temporarily deployed to staging December 16, 2019 22:23 Inactive
@BinaryMuse
Copy link
Contributor

BinaryMuse commented Dec 16, 2019

💥 This works and is ready for review! Preview here: https://primer-css-git-variables-page.primer.now.sh/css/support/variables

@BinaryMuse BinaryMuse marked this pull request as ready for review December 16, 2019 22:30
@BinaryMuse BinaryMuse changed the base branch from variable-deprecations to master December 16, 2019 22:42
Copy link
Contributor

@simurai simurai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this. Will be super handy! 🎉

Left one comment about not repeating the "intro notes", otherwise LGTM! 👍

Copy link
Contributor

@simurai simurai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome.. ok, let's get this into #999. 🚀

@simurai simurai changed the base branch from master to release-14.1.0 December 17, 2019 00:49
@simurai simurai merged commit 19b8fca into release-14.1.0 Dec 17, 2019
@simurai simurai deleted the variables-page branch December 17, 2019 00:50
@simurai simurai mentioned this pull request Dec 17, 2019
6 tasks
@shawnbot
Copy link
Contributor Author

Yay, thanks for getting this over the finish line, @BinaryMuse! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants